<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>	
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>培训计划复核</title>
    <link href="${pageContext.request.contextPath }/static/css/tail.css" rel="stylesheet" type="text/css" />
    <link href="${pageContext.request.contextPath }/static/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
	
    <script type="text/javascript" src="${pageContext.request.contextPath }/static/js/jquery.js"></script>
    <script>
        function change() {
            var height01 = $(window).height();
            $(".top").css('height', height01 - 35+"px");
        }
    </script>
</head>

<body style="border-radius: 8px" onload="change()">
<div class="title"><h2>培训管理》培训计划管理》培训计划复核</h2></div>

 <%-- <form id="form_demo"  method="get" action="${pageContext.request.contextPath }/ChangeStarts.html" > --%>
<div class="top">
    <div>
        <div class="top_out">
        
        	<input style="display: none;" name = "id" id="id" value="${cps.id }">
            <table class="table" >
                <tbody>
               
                <tr>
                	<td>培训名称:</td>
                    <td colspan = "5" style="text-align: left"><input type="text"  name="trainName" value="${cps.trainName }" > </td>
                </tr>
                <tr>
                    <td>培训讲师：</td>
                    <td  style="text-align: left"><input type="text"  name="trainLecturer" value="${cps.trainLecturer }"></td>
                    <td>培训时间：</td>
                    <td style="text-align: left"><input id="demo01" type="text" class="startTime" name="startTime" value="${cps.startTime }"></td>
                	<td style="text-align: center;">至</td>
                	<td><input id="demo02" type="text" class="overTime" name="overTime" value="${cps.overTime }"></td>
                </tr>
                <tr>
                    <td style="line-height: 140px">培训目的:</td>
                    <td colspan = "5" style="text-align: left"><textarea style="width: 100%;height: 150px" name="trainGoal">${cps.trainGoal }</textarea> </td>
                </tr>
                <tr>
                    <td style="line-height: 140px">参训人员：</td>
                    <td colspan = "5" style="text-align: left"><textarea style="width: 100%;height: 150px" name="attendees">${cps.attendees }</textarea></td>
                </tr>
                <tr>
                    <td style="line-height: 140px">培训简介：</td>
                    <td colspan = "5" style="text-align: left"><textarea  id="note" style="width: 100%;height: 150px" name="trainIntro" >${cps.trainIntro }</textarea></td>
                </tr>
                <tr>
                	<td>上传附件</td>
                	<td  colspan = "2"><input type="file" name="filepath" /></td>
                </tr>
                 <tr>
                    <td style="line-height: 140px">审核意见：</td>
                    <td colspan = "5" style="text-align: left"><textarea  id="note" style="width: 100%;height: 150px" name="auditopinion" class="auditopinion">${cps.auditopinion }</textarea></td>
                </tr>
                </tbody>
            </table>
        </div>
        
    </div>
    <div class="bot_btn">
       	<input class="btn" type="submit" onclick="ReviewBy()" value="审核通过" />
       	<input class="btn" type="submit" onclick="Reject()" value="驳回" />
        <button class="btn btn1"><a href="#" onClick="javascript :history.back(-1);" target="right">返回</a></button>
    </div>
</div>
<!-- </form> -->
</body>

<script src="${pageContext.request.contextPath }/static/js/date/js/laydate.js"></script>
<script>
    !function(){
        laydate.skin('molv');
        laydate({elem: '#demo'});
        laydate({elem: '#demo01'});
        laydate({elem: '#demo02'});
    }();
    //审核通过
    function ReviewBy() {
		var id = $('#id').val();
		var auditopinion = $('.auditopinion').val();
		alert(id);
		alert(auditopinion);
		$.ajax({
			url : '../ChangeStarts.json',
			type : 'GET',
			data : {
				"id":id,
				"auditopinion":auditopinion
			},
			dataType : 'json',
			success : function(a) {
	        	if(a.result){
	        		alert("该审核已通过!");
	        		window.location.href = '../GetCvP.html';
	        	}else{
	        		alert("操作失败!");
	        	} 
	      }	
		})
	}
    //驳回
    function Reject() {
    	var id = $('#id').val();
    	$.ajax({
			url : '../cv_Reject.json',
			type : 'GET',
			data : {
				"id":id
			},
			dataType : 'json',
			success : function(a) {
	        	if(a.result){
	        		alert("已驳回该申请!");
	        		window.location.href = '../GetCvP.html';
	        	}else{
	        		alert("驳回失败!");
	        	} 
	      }	
		})
	}
</script>

<script type="text/javascript" src="${pageContext.request.contextPath }/static/js/jquery.js"></script>
</html>